#include "Solid.h"

namespace ouden {

namespace physics {

void CSolid::doIntegration(Scalar timeStep)
{
	
 	//Leapfrog integration 
 	m_vVel 	+= timeStep * m_vForce / m_fMass; 
 	m_vPos 	+= timeStep * m_vVel; 
 	m_vVel 	+= timeStep / 2 * m_vForce / m_fMass; 
 	m_vForce.Zero();
	
	m_fAngVel 	+= timeStep * m_fTorque / m_fInertiaMoment;
	m_fAngle 	+= timeStep * m_fAngVel;
	m_fAngVel 	+= timeStep / 2 * m_fTorque / m_fInertiaMoment;
	m_fTorque = 0;
	
}

} //namespace physics

} //namespace ouden
